-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
docs(user-feedback): Add snippet for manual injection #11502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Bundle ReportChanges will increase total bundle size by 978 bytes (0.01%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could probably copy this file for javascript.remix.mdx too
i'm not talking about flavors for Vue, Svelte, Solid right now tho.
lizokm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
| @@ -0,0 +1,12 @@ | |||
| ```javascript | |||
| const feedback = feedbackIntegration({ | |||
| // Disable injecting the default widget | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Disable injecting the default widget | |
| // Disable the injection of the default widget |
| ```jsx {tabTitle: NextJS} | ||
| function ToggleFeedbackButton() { | ||
| const [feedback, setFeedback] = useState(); | ||
| // Read `getFeedback` on the client only, to avoid hydration errors when server rendering |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Read `getFeedback` on the client only, to avoid hydration errors when server rendering | |
| // Read `getFeedback` on the client only, to avoid hydration errors when server is rendering |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reading this, I think it's better to call this "to avoid hydration errors during server rendering". What do you think @lizokm ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that works!
| ```jsx {tabTitle: React} | ||
| function ToggleFeedbackButton() { | ||
| const [feedback, setFeedback] = useState(); | ||
| // Read `getFeedback` on the client only, to avoid hydration errors when server rendering |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // Read `getFeedback` on the client only, to avoid hydration errors when server rendering | |
| // Read `getFeedback` on the client only, to avoid hydration errors when server is rendering |
bd01ebb to
7a11b58
Compare
DESCRIBE YOUR PR
Create separate feedback code snippets for JS and React.
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes: